import {putMessage,intersect,SS_VALID} from '../Base.js';
import {MDCM_DRG} from '../DRG/MDCM_DRG.js';

export default function MA1_group(record){
    let adrg_zd=[];
    let adrg_zd1=[];
    let adrg_ss=["40.2900x023","40.2905","40.2907","40.2909","40.5000","40.5200","40.5300","40.5301","40.5400x001","40.5907","40.5908","40.5910","40.5911","40.5912","57.7100","57.7101","57.7102","57.7103","60.0x00x001","60.0x03","60.1400","60.3x01","60.4x01","60.5x01","60.5x02","60.6100x002","60.6101","60.6200","60.6201","60.6900x001","60.6900x002","60.7300","61.0x00x003","61.3x00x007","61.3x01","61.3x02","61.3x03","61.4903","62.0x00x001","62.0x01","62.2x00x002","62.2x01","62.3x00","62.3x01","62.3x02","62.3x03","62.3x04","62.4100x004","62.4101","62.4102","62.4103","62.4104","62.4105","62.4200","62.6901","62.7x00","63.3x00x001","63.3x01","63.3x03","63.4x00","63.5300","63.7300","63.7300x003","63.7301","63.9200x001","63.9300","64.2x00x008","64.2x01","64.3x01","64.3x02","64.4300","64.4400","64.4500"];
    let adrg_ss1=[];
    let adrg_ss2=[];
    let dept_list=[];
    if (true && record.ssList && adrg_ss.includes(record.ssList[0])){
        putMessage('符合MA1入组条件，匹配规则：主手术匹配');
        let drg=new MDCM_DRG();
        
        if (drg.MA11_group(record)){
            return 'MA11';
        }

        if (drg.MA13_group(record)){
            return 'MA13';
        }

        if (drg.MA15_group(record)){
            return 'MA15';
        }

        return 'MA1';
    }else{
        return '';
    }
}
  